﻿<ui:View 
    x:Class="Coolvis.Console.Theme.MainView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:ui="clr-namespace:CPPEI.Coolzon.UI;assembly=CPPEI.Coolzon.UI"
    xmlns:mvc="clr-namespace:Coolvis.Console.Theme.MainViewControl"
    mc:Ignorable="d" 
    d:DesignHeight="768" d:DesignWidth="1366">
    <UserControl.Resources>
        <ResourceDictionary Source="Resources/Green.xaml"/>
    </UserControl.Resources>
    <Grid x:Name="grid">
        <!--<Grid.Background>
            <ImageBrush ImageSource="Resources/Images/grid_bg.jpg" TileMode="Tile" AlignmentX="Left" AlignmentY="Top" Viewport="0,0,6,6" ViewportUnits="Absolute"/>
        </Grid.Background>-->
        <Grid.RowDefinitions>
            <RowDefinition Height="41"></RowDefinition>
            <RowDefinition Height="220"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style TargetType="Image" x:Key="closeStyle">
                <Setter Property="Source" Value="Images/x.png" />
                <Style.Triggers>
                    <Trigger Property="IsMouseOver" Value="true">
                        <Setter Property="Source" Value="Images/x2.png" />
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Grid.Resources>
        <mvc:Header x:Name="header" Panel.ZIndex="1" Grid.Row="0"/>
        <Grid Grid.Row="1" Background="#549b35">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <mvc:ZoomView x:Name="zoomView" Grid.Row="0" Margin="5,5,5,5"/>
            <Grid Grid.Row="1" Margin="10,0,10,5">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="当前场景:" Foreground="#fff" FontSize="18" VerticalAlignment="Center" Grid.Column="0"/>
                    <TextBlock Text="-" Foreground="#fff" FontSize="18" VerticalAlignment="Center" Grid.Column="1" Name="ctlTextCurScene"/>
                    <Grid Grid.Column="2" HorizontalAlignment="Right">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>
                        <Button Style="{StaticResource ResourceKey=BtnIcon}" Name="ctlBtnLaser" Margin="5,0,5,0" Grid.Column="0" Click="ctlBtnLaser_Click">
                            <Image Source="Resources/Images/icon-laser.png"/>
                        </Button>
                        <Button Style="{StaticResource ResourceKey=BtnIcon}" Name="ctlBtnMagnifier" Margin="5,0,5,0" Grid.Column="1" Click="ctlBtnMagnifier_Click">
                            <Image Source="Resources/Images/icon-magnifier.png"/>
                        </Button>
                        <Button Style="{StaticResource ResourceKey=BtnIcon}" Name="ctlBtnResetSolution" Margin="5,0,5,0" Grid.Column="2" Click="ctlBtnResetSolution_Click">
                            <Image Source="Resources/Images/icon-refresh.png"/>
                        </Button>
                    </Grid>
                </Grid>
            </Grid>
        </Grid>
        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="60"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid x:Name="centerContent" Grid.Row="0">
                <Grid x:Name="contentBg" Visibility="Hidden" Panel.ZIndex="2">
                    <Image x:Name="closeImg" Style="{StaticResource closeStyle}" VerticalAlignment="Top" HorizontalAlignment="Right" Width="31" Height="31" Margin="0,5,5,0"  MouseLeftButtonDown="closeImg_MouseLeftButtonDown"  />
                </Grid>
                <Border x:Name="sceneContent" Background="Transparent" />
                <mvc:JSControlView x:Name="jsControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="Collapsed"/>
            </Grid>
            <Grid Name="ctlPopupBackground" Visibility="Hidden" Grid.Row="0" Grid.RowSpan="2">
                <Grid.Background>
                    <ImageBrush ImageSource="Resources/Images/grid_bg.jpg" TileMode="Tile" AlignmentX="Left" AlignmentY="Bottom" Viewport="0,0,6,6" ViewportUnits="Absolute"/>
                </Grid.Background>
            </Grid>
            <Grid Grid.Row="0">
                <Grid Name="ctlPopupContainer" Visibility="Hidden"/>
            </Grid>
            <Grid Grid.Row="1">
                <Grid.Background>
                    <ImageBrush ImageSource="Resources/Images/grid_bg.jpg" TileMode="Tile" AlignmentX="Left" AlignmentY="Bottom" Viewport="0,0,6,6" ViewportUnits="Absolute"/>
                </Grid.Background>
                <mvc:OperationNavigation x:Name="operationNavigation" Grid.Row="1" HorizontalAlignment="Center" />
            </Grid>
        </Grid>
        <Grid Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <Button Style="{StaticResource ResourceKey=BtnGreen}" Width="120" Height="38" Grid.Column="0" Margin="10,0,5,5" Name="ctlBtnGoToPrevScene" Click="ctlBtnGoToPrevScene_Click">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="&#xf137;" FontSize="24" Style="{StaticResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Margin="0,0,10,0"/>
                    <TextBlock Text="上一场景" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1"/>
                </Grid>
            </Button>
            <Button Style="{StaticResource ResourceKey=BtnGreen}" Width="120" Height="38" Grid.Column="1" Margin="5,0,10,5" Name="ctlBtnGoToNextScene" Click="ctlBtnGoToNextScene_Click">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="&#xf138;" FontSize="24" Style="{StaticResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Margin="10,0,0,0"/>
                    <TextBlock Text="下一场景" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0"/>
                </Grid>
            </Button>
        </Grid>

        <Grid Name="_ctlMagnifierAlert" Visibility="Hidden" Grid.Row="0" Grid.RowSpan="2">
            <Button  Padding="5" Background="White" HorizontalAlignment="Center" VerticalAlignment="Bottom"
                             Margin="0,0,0,10"
                             Click="OnBtnCloseMagnifierClick">
                <StackPanel Orientation="Horizontal">
                    <Image Source="images/52.png" Width="80" Margin="0,0,5,0"/>
                    <StackPanel Margin="0,0,5,0">
                        <StackPanel Orientation="Horizontal"  HorizontalAlignment="Center">
                            <TextBlock Text="正在使用" FontSize="32" VerticalAlignment="Center"/>
                            <TextBlock Text="放大镜" FontSize="32" VerticalAlignment="Center" FontWeight="Bold" Foreground="Red" Margin="2,0,2,0"/>
                            <TextBlock Text="中..." FontSize="32" VerticalAlignment="Center"/>
                        </StackPanel>
                        <TextBlock Text="点击关闭" FontSize="32" HorizontalAlignment="Center"/>
                    </StackPanel>
                </StackPanel>
            </Button>
        </Grid>
        <Grid Name="_ctlLaserPointAlert" Visibility="Hidden" Grid.Row="0" Grid.RowSpan="2">
            <Button BorderBrush="Red" BorderThickness="1" Background="White" HorizontalAlignment="Center" VerticalAlignment="Bottom"
                            Margin="0,0,0,10"
                            Click="OnBtnCloseLaserPointClick">
                <StackPanel Orientation="Horizontal">
                    <Image Source="images/g2.png" Width="80" Margin="0,0,5,0"/>
                    <StackPanel Margin="0,0,5,0">
                        <StackPanel Orientation="Horizontal"  HorizontalAlignment="Center">
                            <TextBlock Text="正在使用" FontSize="32" VerticalAlignment="Center"/>
                            <TextBlock Text="激光笔" FontSize="32" VerticalAlignment="Center" FontWeight="Bold" Foreground="Red" Margin="2,0,2,0"/>
                            <TextBlock Text="中..." FontSize="32" VerticalAlignment="Center"/>
                        </StackPanel>
                        <TextBlock Text="点击关闭" FontSize="32" HorizontalAlignment="Center"/>
                    </StackPanel>
                </StackPanel>
            </Button>
        </Grid>
    </Grid>
</ui:View>
